package com.zxt.content.copywriting.manager;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zxt.content.copywriting.mapper.CopywritingTypeMapper;
import com.zxt.content.copywriting.model.CopywritingType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 通用逻辑层-文案类型管理类
 *
 * @author zxt
 */
@Slf4j
@Service
public class CopywritingTypeManager extends ServiceImpl<CopywritingTypeMapper, CopywritingType> {

    public List<CopywritingType> queryList() {
        return list();
    }

    public List<CopywritingType> typesList(List<Long> typeIds) {
        LambdaQueryWrapper<CopywritingType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.in(CopywritingType::getId, typeIds);
        return list(lambdaQueryWrapper);
    }
}
